//
//  QualitycreationdetailsTableViewNBCell.m
//  Gxj
//
//  Created by 💋索少杰 on 2017/10/20.
//  Copyright © 2017年 wkq. All rights reserved.
//

#import "QualitycreationdetailsTableViewNBCell.h"

@implementation QualitycreationdetailsTableViewNBCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        
        //用户点击头像响应
        //头像背景
        [self.contentView addSubview:self.viewIcon];
        [self.viewIcon addSubview:self.iconTouxiang];
        //用户名字显示
        [self.contentView addSubview:self.nameText];
        //用户等级图标
        [self.contentView addSubview:self.dengjiTB];
        //用户等级显示
        [self.contentView addSubview:self.dengjiText];
        //浏览人数图标
        [self.contentView addSubview:self.iconLiulang];
        //观看人数
        [self.contentView addSubview:self.liulangNum];
        //用户发表内容
        [self.contentView addSubview:self.contentText];
        //发表时间图标
        [self.contentView addSubview:self.iconShijian];
        //用户发表时间
        [self.contentView addSubview:self.shijianText];
        //点赞数量
        [self.contentView addSubview:self.dianzanNum];
        //点赞图片
        [self.contentView addSubview:self.dianzanIcon];
        //用户发表图片
        [self.contentView addSubview:self.fabiaoImage];
        //关注按钮
        [self.contentView addSubview:self.guanzhu];
        //最佳讨论文字
        [self.contentView addSubview:self.firstRateText];
        //全部讨论文字
        [self.contentView addSubview:self.allRateText];
        //动态内容
        [self.contentView addSubview:self.activeContents];
        //用户评论头像阴影
        [self.contentView addSubview:self.viewIconYH];
        //头像
        [self.viewIconYH addSubview:self.iconTouxiangYH];
        //用户评论名字
        [self.contentView addSubview:self.nameTextYH];
        //打赏
        [self.contentView addSubview:self.reward];
        //举报
        [self.contentView addSubview:self.report];
        //一级评论内容
        [self.contentView addSubview:self.commentOne];
        //二级评论阴影
        [self.contentView addSubview:self.imageCommentTwo];
        //二级评论名字
        [self.imageCommentTwo addSubview:self.commentTwoName];
        //二级评论内容
        [self.imageCommentTwo addSubview:self.commentTwoText];
        //时间图标
        [self.contentView addSubview:self.iconTime];
        //时间
        [self.contentView addSubview:self.timeText];
        //点赞
        [self.contentView addSubview:self.getUp];
        //点赞数量
        [self.contentView addSubview:self.getUpNum];
        //
        [self.contentView addSubview:self.imageicon];
        //
        [self.contentView addSubview:self.numText];
        //查看更多
        [self.imageCommentTwo addSubview:self.checkBut];
        
        //二级
        //用户评论头像阴影
        [self.contentView addSubview:self.viewIconYHT];
        //头像
        [self.viewIconYHT addSubview:self.iconTouxiangYHT];
        //用户评论名字
        [self.contentView addSubview:self.nameTextYHT];
        //举报
        [self.contentView addSubview:self.reportT];
        //一级评论内容
        [self.contentView addSubview:self.commentOneT];
        //二级评论阴影
        [self.contentView addSubview:self.imageCommentTwoT];
        //二级评论名字
        [self.imageCommentTwoT addSubview:self.commentTwoNameT];
        //二级评论内容
        [self.imageCommentTwoT addSubview:self.commentTwoTextT];
        //时间图标
        [self.contentView addSubview:self.iconTimeT];
        //时间
        [self.contentView addSubview:self.timeTextT];
        //点赞
        [self.contentView addSubview:self.getUpT];
        //点赞数量
        [self.contentView addSubview:self.getUpNumT];
        //
        [self.contentView addSubview:self.imageiconT];
        //
        [self.contentView addSubview:self.numTextT];
        //查看更多
        [self.imageCommentTwoT addSubview:self.checkButT];
        
        
        
        
        //适配方法
        [self setUpadapter];
        
        
        //商业标签
        for (int i = 0; i < 3; i++) {
            _theLabel = [[UILabel alloc] initWithFrame:CGRectMake(kWidthScale(5) + kWidthScale(40) * i, kHeightScale(5), kWidthScale(35), kHeightScale(15))];
            
            _theLabel.backgroundColor = [UIColor colorWithWhite:0 alpha:0.4];
            _theLabel.text = @"商业";
            _theLabel.textColor = [UIColor colorWithWhite:1 alpha:1];
            _theLabel.font = [UIFont systemFontOfSize:kWidthScale(9)];
            _theLabel.textAlignment = NSTextAlignmentCenter;
            _theLabel.layer.cornerRadius = kWidthScale(5);
            _theLabel.layer.masksToBounds = YES;
            
            [self.fabiaoImage addSubview:self.theLabel];
        }
        
        
        
    }
    return self;
}


//适配方法
- (void)setUpadapter
{
    //头像背景
    _viewIcon.sd_layout
    .topSpaceToView(self.contentView, kHeightScale(11))
    .leftSpaceToView(self.contentView, kWidthScale(15))
    .widthIs(kWidthScale(25))
    .heightIs(kHeightScale(25));
    
    //头像
    _iconTouxiang.sd_layout
    .topSpaceToView(self.viewIcon, kHeightScale(1.5))
    .leftSpaceToView(self.viewIcon, kWidthScale(1.5))
    .widthIs(kWidthScale(22))
    .heightIs(kHeightScale(22));
    
    //名字
    _nameText.sd_layout
    .topSpaceToView(self.contentView, kHeightScale(10))
    .leftSpaceToView(self.viewIcon, kWidthScale(5))
    .widthIs(kWidthScale(100))
    .autoHeightRatio(0);
    
    //等级图标
    _dengjiTB.sd_layout
    .topSpaceToView(self.nameText, kHeightScale(3))
    .leftSpaceToView(self.viewIcon, kWidthScale(5))
    .widthIs(kWidthScale(11))
    .heightIs(kHeightScale(11));
    //等级时间
    _dengjiText.sd_layout
    .centerYEqualToView(self.dengjiTB)
    .leftSpaceToView(self.dengjiTB, kWidthScale(3))
    .widthIs(kWidthScale(30))
    .autoHeightRatio(0);
    //发表内容
    _contentText.sd_layout
    .topSpaceToView(self.dengjiTB, kHeightScale(20/2))
    .leftSpaceToView(self.contentView, kWidthScale(30/2))
    .rightSpaceToView(self.contentView, kWidthScale(30/2))
    .autoHeightRatio(0);
    //时间图标
    _iconShijian.sd_layout
    .topSpaceToView(self.contentText,kHeightScale(5))
    .leftEqualToView(self.viewIcon)
    .widthIs(kWidthScale(13))
    .heightIs(kHeightScale(13));
    //时间
    _shijianText.sd_layout
    .topSpaceToView(self.contentText, kHeightScale(4))
    .leftSpaceToView(self.iconShijian, kWidthScale(5))
    .widthIs(kWidthScale(40))
    .autoHeightRatio(0);
    //浏览图标
    _iconLiulang.sd_layout
    .topSpaceToView(self.contentText, kHeightScale(7))
    .leftSpaceToView(self.shijianText, kWidthScale(5))
    .widthIs(kWidthScale(13))
    .heightIs(kHeightScale(8.6));
    //浏览人数
    _liulangNum.sd_layout
    .topEqualToView(self.shijianText)
    .leftSpaceToView(self.iconLiulang, kWidthScale(5))
    .widthIs(kWidthScale(35))
    .autoHeightRatio(0);
    //点赞图片
    _dianzanIcon.sd_layout
    .topSpaceToView(self.contentText, kHeightScale(5))
    .leftSpaceToView(self.liulangNum, kWidthScale(10))
    .widthIs(kWidthScale(12))
    .heightIs(kHeightScale(12));
    //点赞数量
    _dianzanNum.sd_layout
    .topEqualToView(self.shijianText)
    .leftSpaceToView(self.dianzanIcon, kWidthScale(5))
    .widthIs(kWidthScale(50))
    .autoHeightRatio(0);
    //发表图片
    _fabiaoImage.sd_layout
    .topSpaceToView(self.iconShijian, kHeightScale(10))
    .leftSpaceToView(self.contentView, kWidthScale(15))
    .rightSpaceToView(self.contentView, kWidthScale(15))
    .heightIs(kHeightScale(110));
    
    //关注
    _guanzhu.sd_layout
    .topSpaceToView(self.contentView,kHeightScale(10))
    .rightSpaceToView(self.contentView,kWidthScale(15))
    .widthIs(kWidthScale(44))
    .heightIs(kHeightScale(25));
    //最佳文字讨论
    _firstRateText.sd_layout
    .topSpaceToView(self.fabiaoImage, kHeightScale(120))
    .leftSpaceToView(self.contentView, 0)
    .rightSpaceToView(self.contentView, 0)
    .heightIs(kHeightScale(50/2));
    //动态内容
    _activeContents.sd_layout
    .topSpaceToView(self.fabiaoImage, kHeightScale(20/2))
    .leftSpaceToView(self.contentView, kWidthScale(15))
    .rightSpaceToView(self.contentView, kWidthScale(15))
    .bottomSpaceToView(self.firstRateText, kHeightScale(20/2));
    
    //用户头像背景
    _viewIconYH.sd_layout
    .topSpaceToView(self.firstRateText, kHeightScale(20/2))
    .leftSpaceToView(self.contentView, kWidthScale(15))
    .widthIs(kWidthScale(25))
    .heightIs(kHeightScale(25));
    
    //头像
    _iconTouxiangYH.sd_layout
    .topSpaceToView(self.viewIconYH, kHeightScale(1.5))
    .leftSpaceToView(self.viewIconYH, kWidthScale(1.5))
    .widthIs(kWidthScale(22))
    .heightIs(kHeightScale(22));
    //评论用户名字
    _nameTextYH.sd_layout
    .topSpaceToView(self.firstRateText, kHeightScale(34/2))
    .leftSpaceToView(self.viewIconYH, kWidthScale(10/2))
    .widthIs(kWidthScale(100))
    .autoHeightRatio(0);
    
    //打赏
    _reward.sd_layout
    .topSpaceToView(self.viewIconYH, kHeightScale(10/2))
    .leftSpaceToView(self.contentView, kWidthScale(32/2))
    .widthIs(kWidthScale(46/2))
    .heightIs(kHeightScale(46/2));
    //举报
    _report.sd_layout
    .topSpaceToView(self.firstRateText, kHeightScale(34/2))
    .rightSpaceToView(self.contentView, kWidthScale(30/2))
    .widthIs(kWidthScale(11.5))
    .heightIs(kHeightScale(11.5));
    //一级评论
    _commentOne.sd_layout
    .topSpaceToView(self.nameTextYH, kHeightScale(30/2))
    .leftSpaceToView(self.reward, kWidthScale(7))
    .rightSpaceToView(self.contentView, kWidthScale(15))
    .autoHeightRatio(0);
    //二级阴影
    _imageCommentTwo.sd_layout
    .topSpaceToView(self.commentOne, kHeightScale(20/2))
    .leftEqualToView(self.commentOne)
    .rightSpaceToView(self.contentView, kWidthScale(30/2))
    .heightIs(kHeightScale(100));
    //二级评论名字
    _commentTwoName.sd_layout
    .topSpaceToView(self.imageCommentTwo, kHeightScale(5))
    .leftSpaceToView(self.imageCommentTwo, kWidthScale(6))
    .widthIs(kWidthScale(50))
    .autoHeightRatio(0);
    //二级评论内容
    _commentTwoText.sd_layout
    .topSpaceToView(self.imageCommentTwo, kHeightScale(0))
    .leftSpaceToView(self.commentTwoName, 0)
    .rightSpaceToView(self.imageCommentTwo, 0)
    .autoHeightRatio(0);
    //时间图标
    _iconTime.sd_layout
    .topSpaceToView(self.imageCommentTwo, kHeightScale(10))
    .leftEqualToView(self.imageCommentTwo)
    .widthIs(kWidthScale(11.5))
    .heightIs(kHeightScale(11.5));
    //时间
    _timeText.sd_layout
    .centerYEqualToView(self.iconTime)
    .leftSpaceToView(self.iconTime, kWidthScale(5))
    .widthIs(kWidthScale(30))
    .autoHeightRatio(0);
    //点赞
    _getUp.sd_layout
    .centerYEqualToView(self.iconTime)
    .leftSpaceToView(self.timeText, kWidthScale(365/2))
    .widthIs(kWidthScale(11.5))
    .heightIs(kHeightScale(11.5));
    //点赞数量
    _getUpNum.sd_layout
    .centerYEqualToView(self.iconTime)
    .leftSpaceToView(self.getUp, kWidthScale(5))
    .widthIs(kWidthScale(22))
    .autoHeightRatio(0);
    //
    _imageicon.sd_layout
    .centerYEqualToView(self.iconTime)
    .rightSpaceToView(self.numText, kWidthScale(5))
    .widthIs(kWidthScale(15))
    .heightIs(kHeightScale(11));
    //
    _numText.sd_layout
    .centerYEqualToView(self.iconTime)
    .rightSpaceToView(self.contentView, kWidthScale(15))
    .widthIs(kWidthScale(23))
    .autoHeightRatio(0);
    //全部文字讨论
    _allRateText.sd_layout
    .topSpaceToView(self.iconTime, kHeightScale(10))
    .leftSpaceToView(self.contentView, 0)
    .rightSpaceToView(self.contentView, 0)
    .heightIs(kHeightScale(50/2));
    //查看更多
    _checkBut.sd_layout
    .bottomSpaceToView(self.imageCommentTwo, kHeightScale(10))
    .leftSpaceToView(self.imageCommentTwo, kWidthScale(-8))
    .widthIs(kWidthScale(100))
    .autoHeightRatio(0);
    
    
    //二级讨论
    //用户头像背景
    _viewIconYHT.sd_layout
    .topSpaceToView(self.allRateText, kHeightScale(20/2))
    .leftSpaceToView(self.contentView, kWidthScale(15))
    .widthIs(kWidthScale(25))
    .heightIs(kHeightScale(25));
    
    //头像
    _iconTouxiangYHT.sd_layout
    .topSpaceToView(self.viewIconYHT, kHeightScale(1.5))
    .leftSpaceToView(self.viewIconYHT, kWidthScale(1.5))
    .widthIs(kWidthScale(22))
    .heightIs(kHeightScale(22));
    //评论用户名字
    _nameTextYHT.sd_layout
    .topSpaceToView(self.allRateText, kHeightScale(34/2))
    .leftSpaceToView(self.viewIconYHT, kWidthScale(10/2))
    .widthIs(kWidthScale(100))
    .autoHeightRatio(0);
    
    //举报
    _reportT.sd_layout
    .topSpaceToView(self.allRateText, kHeightScale(34/2))
    .rightSpaceToView(self.contentView, kWidthScale(30/2))
    .widthIs(kWidthScale(22/2))
    .heightIs(kHeightScale(22/2));
    //一级评论
    _commentOneT.sd_layout
    .topSpaceToView(self.nameTextYHT, kHeightScale(20/2))
    .leftSpaceToView(self.reward, kWidthScale(7))
    .rightSpaceToView(self.contentView, kWidthScale(15))
    .autoHeightRatio(0);
    //二级阴影
    _imageCommentTwoT.sd_layout
    .topSpaceToView(self.commentOneT, kHeightScale(20/2))
    .leftEqualToView(self.commentOneT)
    .rightSpaceToView(self.contentView, kWidthScale(30/2))
    .heightIs(kHeightScale(100));
    //二级评论名字
    _commentTwoNameT.sd_layout
    .topSpaceToView(self.imageCommentTwoT, kHeightScale(5))
    .leftSpaceToView(self.imageCommentTwoT, kWidthScale(6))
    .widthIs(kWidthScale(50))
    .autoHeightRatio(0);
    //二级评论内容
    _commentTwoTextT.sd_layout
    .topSpaceToView(self.imageCommentTwoT, kHeightScale(0))
    .leftSpaceToView(self.commentTwoNameT, 0)
    .rightSpaceToView(self.imageCommentTwoT, 0)
    .autoHeightRatio(0);
    //时间图标
    _iconTimeT.sd_layout
    .topSpaceToView(self.imageCommentTwoT, kHeightScale(10))
    .leftEqualToView(self.imageCommentTwoT)
    .widthIs(kWidthScale(11.5))
    .heightIs(kHeightScale(11.5));
    //时间
    _timeTextT.sd_layout
    .centerYEqualToView(self.iconTimeT)
    .leftSpaceToView(self.iconTimeT, kWidthScale(5))
    .widthIs(kWidthScale(30))
    .autoHeightRatio(0);
    //点赞
    _getUpT.sd_layout
    .centerYEqualToView(self.iconTimeT)
    .leftSpaceToView(self.timeTextT, kWidthScale(365/2))
    .widthIs(kWidthScale(11.5))
    .heightIs(kHeightScale(11.5));
    //点赞数量
    _getUpNumT.sd_layout
    .centerYEqualToView(self.iconTimeT)
    .leftSpaceToView(self.getUpT, kWidthScale(5))
    .widthIs(kWidthScale(22))
    .autoHeightRatio(0);
    //
    _imageiconT.sd_layout
    .centerYEqualToView(self.iconTimeT)
    .rightSpaceToView(self.numTextT, kWidthScale(5))
    .widthIs(kWidthScale(15))
    .heightIs(kHeightScale(11));
    //
    _numTextT.sd_layout
    .centerYEqualToView(self.iconTimeT)
    .rightSpaceToView(self.contentView, kWidthScale(15))
    .widthIs(kWidthScale(23))
    .autoHeightRatio(0);
    //查看更多
    _checkButT.sd_layout
    .bottomSpaceToView(self.imageCommentTwoT, kHeightScale(10))
    .leftSpaceToView(self.imageCommentTwoT, kWidthScale(-8))
    .widthIs(kWidthScale(100))
    .autoHeightRatio(0);
    
    
    
}
//头像背景
- (UIView *)viewIcon
{
    if (!_viewIcon)
    {
        _viewIcon=[[UIView alloc] init];
        _viewIcon.backgroundColor = [UIColor colorWithRed:(213.0/255) green:(213.0/255) blue:(213.0/255) alpha:1];;
        _viewIcon.layer.masksToBounds=YES;
        _viewIcon.layer.cornerRadius=12.5;
        _viewIcon.layer.shadowColor = [UIColor blackColor].CGColor;
        _viewIcon.layer.shadowOffset = CGSizeMake(-3, 1);
        _viewIcon.layer.shadowOpacity = 0.4;
        _viewIcon.layer.shadowRadius = 2.0;
        _viewIcon.clipsToBounds = NO;
    }
    return _viewIcon;
}
//头像
- (UIButton *)iconTouxiang
{
    if (!_iconTouxiang)
    {
        _iconTouxiang=[[UIButton alloc] init];
        [_iconTouxiang setBackgroundImage:[UIImage imageNamed:@"toixiang"] forState:UIControlStateNormal];
    }
    return _iconTouxiang;
}
//名字
- (UILabel *)nameText
{
    if (!_nameText)
    {
        _nameText=[[UILabel alloc] init];
        _nameText.text=@"后悔的小公主";
        _nameText.font = [UIFont systemFontOfSize:kWidthScale(12)];
        _nameText.textColor = [UIColor colorWithHexString:@"#333333"];
    }
    return _nameText;
}
//等级图标
- (UIImageView *)dengjiTB
{
    if (!_dengjiTB)
    {
        _dengjiTB=[[UIImageView alloc] init];
        _dengjiTB.image=[UIImage imageNamed:@"dengjis"];
    }
    return _dengjiTB;
}
//等级
- (UILabel *)dengjiText
{
    if (!_dengjiText)
    {
        _dengjiText=[[UILabel alloc] init];
        _dengjiText.text=@"100级";
        _dengjiText.textColor=[UIColor colorWithRed:(153.0/255) green:(153.0/255) blue:(153.0/255) alpha:1];
        _dengjiText.font=[UIFont systemFontOfSize:kWidthScale(10)];
    }
    return _dengjiText;
}
//用户发表动态
- (UILabel *)contentText
{
    if (!_contentText)
    {
        _contentText=[[UILabel alloc] init];
        _contentText.text=@"梦想有多大就能飞多远";
        _contentText.textColor = [UIColor colorWithHexString:@"#333333"];
        _contentText.font=[UIFont systemFontOfSize:kWidthScale(14)];
    }
    return _contentText;
}
//发表时间图标
- (UIImageView *)iconShijian
{
    if (!_iconShijian)
    {
        _iconShijian=[[UIImageView alloc] init];
        _iconShijian.image=[UIImage imageNamed:@"time"];
    }
    return _iconShijian;
}
//发表时间
- (UILabel *)shijianText
{
    if (!_shijianText)
    {
        _shijianText=[[UILabel alloc] init];
        _shijianText.text=@"15:20";
        _shijianText.textColor=[UIColor colorWithRed:(153.0/255) green:(153.0/255) blue:(153.0/255) alpha:1];
        _shijianText.font=[UIFont systemFontOfSize:kWidthScale(12)];
    }
    return _shijianText;
}
//浏览图标
- (UIImageView *)iconLiulang
{
    if (!_iconLiulang)
    {
        _iconLiulang=[[UIImageView alloc] init];
        _iconLiulang.image=[UIImage imageNamed:@"liulans"];
    }
    return _iconLiulang;
}
//浏览人数
- (UILabel *)liulangNum
{
    if (!_liulangNum)
    {
        _liulangNum=[[UILabel alloc] init];
        _liulangNum.text=@"8461";
        _liulangNum.textColor=[UIColor colorWithRed:(153.0/255) green:(153.0/255) blue:(153.0/255) alpha:1];
        _liulangNum.font=[UIFont systemFontOfSize:kWidthScale(12)];
    }
    return _liulangNum;
}
//点赞图片
- (UIImageView *)dianzanIcon
{
    if (!_dianzanIcon)
    {
        _dianzanIcon=[[UIImageView alloc] init];
        _dianzanIcon.image=[UIImage imageNamed:@"zans"];
    }
    return _dianzanIcon;
}
//点赞数量
- (UILabel *)dianzanNum
{
    if (!_dianzanNum)
    {
        _dianzanNum=[[UILabel alloc] init];
        _dianzanNum.text=@"1000";
        _dianzanNum.textColor=[UIColor colorWithRed:(153.0/255) green:(153.0/255) blue:(153.0/255) alpha:1];
        _dianzanNum.font=[UIFont systemFontOfSize:kWidthScale(12)];
    }
    return _dianzanNum;
}
//发表图片
- (UIImageView *)fabiaoImage
{
    if (!_fabiaoImage)
    {
        _fabiaoImage=[[UIImageView alloc] init];
        _fabiaoImage.image=[UIImage imageNamed:@"banner"];
        _fabiaoImage.layer.masksToBounds=YES;
        _fabiaoImage.layer.cornerRadius=kWidthScale(12);
    }
    return _fabiaoImage;
}
//关注
- (UIButton *)guanzhu
{
    if (!_guanzhu)
    {
        _guanzhu = [UIButton buttonWithType:UIButtonTypeCustom];
        [_guanzhu setBackgroundImage:[UIImage imageNamed:@"guanzhu"] forState:0];
        _guanzhu.contentMode = UIViewContentModeScaleAspectFit;
    }
    return _guanzhu;
}
//最佳讨论背景
- (UIImageView *)imagezuijia
{
    if (!_imagezuijia)
    {
        _imagezuijia=[[UIImageView alloc] init];
        _imagezuijia.backgroundColor=[UIColor colorWithRed:(102.0/255) green:(102.0/255) blue:(102.0/255) alpha:1];
    }
    return _imagezuijia;
}
//最佳讨论文字
- (KQlable *)firstRateText
{
    if (!_firstRateText)
    {
        _firstRateText=[[KQlable alloc] init];
        _firstRateText.text=@"最佳讨论(10)";
        _firstRateText.font=[UIFont systemFontOfSize:kWidthScale(24/2)];
        _firstRateText.textColor=[UIColor colorWithRed:(102.0/255) green:(102.0/255) blue:(102.0/255) alpha:1];
        _firstRateText.backgroundColor=[UIColor colorWithRed:(242.0/255) green:(242.0/255) blue:(242.0/255) alpha:1];
        _firstRateText.textAlignment=NSTextAlignmentLeft;
        //        _firstRateText.edgeInsets =UIEdgeInsetsMake(8, 8 + 10, 8, 8 + 10); // 设置内边距
        
    }
    return _firstRateText;
}
//动态内容
- (UILabel *)activeContents
{
    if (!_activeContents)
    {
        _activeContents=[[UILabel alloc] init];
        _activeContents.text=@"这四个种正常血清的LDH同功酶及A、B两种亚基的含量存在着差异。夏枯草各部位中均含有活性成分，但是不同时期不同部位活性成分含量存在很大差异是不同时期不同部位活性成分含量存在很大差异是不同时期不同部位活性成分含量存在很大差异是不同时期不同部位活性成分含量存在很大差异是不同时期不同部位活性成分含量存在很大差异";
        _activeContents.textColor=[UIColor colorWithRed:(102.0/255) green:(102.0/255) blue:(102.0/255) alpha:1];
        _activeContents.font=[UIFont systemFontOfSize:kWidthScale(24/2)];
        _activeContents.numberOfLines=0;
        [KQlable changeLineSpaceForLabel:_activeContents WithSpace:3.0f];
    }
    return _activeContents;
}
//最佳讨论文字
- (KQlable *)allRateText
{
    if (!_allRateText)
    {
        _allRateText=[[KQlable alloc] init];
        _allRateText.text=@"全部讨论(10)";
        _allRateText.font=[UIFont systemFontOfSize:kWidthScale(24/2)];
        _allRateText.textColor=[UIColor colorWithRed:(102.0/255) green:(102.0/255) blue:(102.0/255) alpha:1];
        _allRateText.backgroundColor=[UIColor colorWithRed:(242.0/255) green:(242.0/255) blue:(242.0/255) alpha:1];
        _allRateText.textAlignment=NSTextAlignmentLeft;
        
    }
    return _allRateText;
}
//用户头像背景
- (UIView *)viewIconYH
{
    if (!_viewIconYH)
    {
        _viewIconYH=[[UIView alloc] init];
        _viewIconYH.backgroundColor = [UIColor colorWithRed:(213.0/255) green:(213.0/255) blue:(213.0/255) alpha:1];;
        _viewIconYH.layer.masksToBounds=YES;
        _viewIconYH.layer.cornerRadius=12.5;
        _viewIconYH.layer.shadowColor = [UIColor blackColor].CGColor;
        _viewIconYH.layer.shadowOffset = CGSizeMake(-3, 1);
        _viewIconYH.layer.shadowOpacity = 0.4;
        _viewIconYH.layer.shadowRadius = 2.0;
        _viewIconYH.clipsToBounds = NO;
    }
    return _viewIconYH;
}
//头像
- (UIButton *)iconTouxiangYH
{
    if (!_iconTouxiangYH)
    {
        _iconTouxiangYH=[[UIButton alloc] init];
        [_iconTouxiangYH setBackgroundImage:[UIImage imageNamed:@"toixiang"] forState:UIControlStateNormal];
    }
    return _iconTouxiangYH;
}
//评论用户名字
- (UILabel *)nameTextYH
{
    if (!_nameTextYH)
    {
        _nameTextYH=[[UILabel alloc] init];
        _nameTextYH.text=@"马勒戈壁哇";
        _nameTextYH.font = [UIFont systemFontOfSize:kWidthScale(12)];
        _nameTextYH.textColor = [UIColor colorWithHexString:@"#333333"];
    }
    return _nameTextYH;
}
//打赏
- (UIButton *)reward
{
    if (!_reward)
    {
        _reward=[[UIButton alloc] init];
        _reward.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"shang111"]];
    }
    return _reward;
}
//举报
- (UIButton *)report
{
    if (!_report)
    {
        _report=[[UIButton alloc] init];
        _report.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"cxjubao"]];
    }
    return _report;
}
//一级评论内容
- (UILabel *)commentOne
{
    if (!_commentOne)
    {
        _commentOne=[[UILabel alloc] init];
        _commentOne.text=@"这四个种正常血清的LDH同功酶及A、B两种亚基的含量存在着差异。\n夏枯草各部位中均含有活性成分，但是不同时期\n不同部位活性成分含量存在很大差异是不同时期不同部位活性成分含量存在很大差异是不同时期不同部";
        _commentOne.textColor=[UIColor colorWithRed:(102.0/255) green:(102.0/255) blue:(102.0/255) alpha:1];
        _commentOne.font=[UIFont systemFontOfSize:kWidthScale(24/2)];
        _commentOne.numberOfLines=0;
        [KQlable changeLineSpaceForLabel:_commentOne WithSpace:3.0f];
    }
    return _commentOne;
}
//二级评论阴影
- (UIImageView *)imageCommentTwo
{
    if (!_imageCommentTwo)
    {
        _imageCommentTwo=[[UIImageView alloc] init];
        _imageCommentTwo.backgroundColor=[UIColor colorWithRed:(242.0/255) green:(242.0/255) blue:(242.0/255) alpha:1];
        _imageCommentTwo.layer.masksToBounds=YES;
        _imageCommentTwo.layer.cornerRadius=kWidthScale(10);
    }
    return _imageCommentTwo;
}
//二级评论名字
- (UILabel *)commentTwoName
{
    if (!_commentTwoName)
    {
        _commentTwoName=[[UILabel alloc] init];
        _commentTwoName.text=@"花生米:";
        _commentTwoName.textColor=[UIColor colorWithRed:(153.0/255) green:(153.0/255) blue:(153.0/255) alpha:1];
        _commentTwoName.font=[UIFont systemFontOfSize:kWidthScale(24/2)];
        _commentTwoName.numberOfLines=0;
        //[KQlable changeLineSpaceForLabel:_commentTwoName WithSpace:5.0f];
    }
    return _commentTwoName;
}
//二级评论内容
- (UILabel *)commentTwoText
{
    if (!_commentTwoText)
    {
        _commentTwoText=[[UILabel alloc] init];
        _commentTwoText.text=@"这四个种正常血清的LDH同功酶及A、B两种亚基的含量存在着差异。\n";
        _commentTwoText.textColor=[UIColor colorWithRed:(102.0/255) green:(102.0/255) blue:(102.0/255) alpha:1];
        _commentTwoText.font=[UIFont systemFontOfSize:kWidthScale(24/2)];
        _commentTwoText.numberOfLines=0;
        [KQlable changeLineSpaceForLabel:_commentTwoText WithSpace:3.0f];
    }
    return _commentTwoText;
}
//时间图标
- (UIImageView *)iconTime
{
    if (!_iconTime)
    {
        _iconTime=[[UIImageView alloc] init];
        _iconTime.image=[UIImage imageNamed:@"time"];
    }
    return _iconTime;
}
//时间
- (UILabel *)timeText
{
    if (!_timeText)
    {
        _timeText=[[UILabel alloc] init];
        _timeText.text=@"09.18";
        _timeText.textColor=[UIColor colorWithRed:(153.0/255) green:(153.0/255) blue:(153.0/255) alpha:1];
        _timeText.font=[UIFont systemFontOfSize:kWidthScale(11)];
    }
    return _timeText;
}
//点赞
- (UIImageView *)getUp
{
    if (!_getUp)
    {
        _getUp=[[UIImageView alloc] init];
        _getUp.image=[UIImage imageNamed:@"zans"];
    }
    return _getUp;
}
//点赞数量
- (UILabel *)getUpNum
{
    if (!_getUpNum)
    {
        _getUpNum=[[UILabel alloc] init];
        _getUpNum.text=@"100";
        _getUpNum.textColor=[UIColor colorWithRed:(153.0/255) green:(153.0/255) blue:(153.0/255) alpha:1];
        _getUpNum.font=[UIFont systemFontOfSize:kWidthScale(11)];
    }
    return _getUpNum;
}
//
- (UIImageView *)imageicon
{
    if (!_imageicon)
    {
        _imageicon=[[UIImageView alloc] init];
        _imageicon.image=[UIImage imageNamed:@"cxbianlun"];
    }
    return _imageicon;
}
- (UILabel *)numText
{
    if (!_numText)
    {
        _numText=[[UILabel alloc] init];
        _numText.text=@"100";
        _numText.textColor=[UIColor colorWithRed:(153.0/255) green:(153.0/255) blue:(153.0/255) alpha:1];
        _numText.font=[UIFont systemFontOfSize:kWidthScale(11)];
    }
    return _numText;
}
//查看更多
- (UIButton *)checkBut
{
    if (!_checkBut)
    {
        _checkBut=[[UIButton alloc] init];
        [_checkBut setTitle:@"共120条讨论" forState:UIControlStateNormal];
        [_checkBut setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];
        _checkBut.titleLabel.font=[UIFont systemFontOfSize:kWidthScale(24/2)];
        [_checkBut setBackgroundColor:[UIColor orangeColor]];
    }
    return _checkBut;
}



//**      二级
//用户头像背景
- (UIView *)viewIconYHT
{
    if (!_viewIconYHT)
    {
        _viewIconYHT=[[UIView alloc] init];
        _viewIconYHT.backgroundColor = [UIColor colorWithRed:(213.0/255) green:(213.0/255) blue:(213.0/255) alpha:1];;
        _viewIconYHT.layer.masksToBounds=YES;
        _viewIconYHT.layer.cornerRadius=12.5;
        _viewIconYHT.layer.shadowColor = [UIColor blackColor].CGColor;
        _viewIconYHT.layer.shadowOffset = CGSizeMake(-3, 1);
        _viewIconYHT.layer.shadowOpacity = 0.4;
        _viewIconYHT.layer.shadowRadius = 2.0;
        _viewIconYHT.clipsToBounds = NO;
    }
    return _viewIconYHT;
}
//头像
- (UIButton *)iconTouxiangYHT
{
    if (!_iconTouxiangYHT)
    {
        _iconTouxiangYHT=[[UIButton alloc] init];
        [_iconTouxiangYHT setBackgroundImage:[UIImage imageNamed:@"toixiang"] forState:UIControlStateNormal];
    }
    return _iconTouxiangYHT;
}
//评论用户名字
- (UILabel *)nameTextYHT
{
    if (!_nameTextYHT)
    {
        _nameTextYHT=[[UILabel alloc] init];
        _nameTextYHT.text=@"马勒戈壁哇";
        _nameTextYHT.font = [UIFont systemFontOfSize:kWidthScale(12)];
        _nameTextYHT.textColor = [UIColor colorWithHexString:@"#333333"];
    }
    return _nameTextYHT;
}
//举报
- (UIButton *)reportT
{
    if (!_reportT)
    {
        _reportT=[[UIButton alloc] init];
        _reportT.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"cxjubao"]];
    }
    return _reportT;
}
//一级评论内容
- (UILabel *)commentOneT
{
    if (!_commentOneT)
    {
        _commentOneT=[[UILabel alloc] init];
        _commentOneT.text=@"这四个种正常血清的LDH同功酶及A、B两种亚基的含量存在着差异。\n夏枯草各部位中均含有活性成分，但是不同时期\n不同部位活性成分含量存在很大差异是不同时期不同部位活性成分含量存在很大差异是不同时期不同部";
        _commentOneT.textColor=[UIColor colorWithRed:(102.0/255) green:(102.0/255) blue:(102.0/255) alpha:1];
        _commentOneT.font=[UIFont systemFontOfSize:kWidthScale(24/2)];
        _commentOneT.numberOfLines=0;
        [KQlable changeLineSpaceForLabel:_commentOneT WithSpace:3.0f];
    }
    return _commentOneT;
}
//二级评论阴影
- (UIImageView *)imageCommentTwoT
{
    if (!_imageCommentTwoT)
    {
        _imageCommentTwoT=[[UIImageView alloc] init];
        _imageCommentTwoT.backgroundColor=[UIColor colorWithRed:(242.0/255) green:(242.0/255) blue:(242.0/255) alpha:1];
        _imageCommentTwoT.layer.masksToBounds=YES;
        _imageCommentTwoT.layer.cornerRadius=kWidthScale(10);
    }
    return _imageCommentTwoT;
}
//二级评论名字
- (UILabel *)commentTwoNameT
{
    if (!_commentTwoNameT)
    {
        _commentTwoNameT=[[UILabel alloc] init];
        _commentTwoNameT.text=@"花生米:";
        _commentTwoNameT.textColor=[UIColor colorWithRed:(153.0/255) green:(153.0/255) blue:(153.0/255) alpha:1];
        _commentTwoNameT.font=[UIFont systemFontOfSize:kWidthScale(24/2)];
        _commentTwoNameT.numberOfLines=0;
        //[KQlable changeLineSpaceForLabel:_commentTwoName WithSpace:5.0f];
    }
    return _commentTwoNameT;
}
//二级评论内容
- (UILabel *)commentTwoTextT
{
    if (!_commentTwoTextT)
    {
        _commentTwoTextT=[[UILabel alloc] init];
        _commentTwoTextT.text=@"这四个种正常血清的LDH同功酶及A、B两种亚基的含量存在着差异。\n";
        _commentTwoTextT.textColor=[UIColor colorWithRed:(102.0/255) green:(102.0/255) blue:(102.0/255) alpha:1];
        _commentTwoTextT.font=[UIFont systemFontOfSize:kWidthScale(24/2)];
        _commentTwoTextT.numberOfLines=0;
        [KQlable changeLineSpaceForLabel:_commentTwoTextT WithSpace:3.0f];
    }
    return _commentTwoTextT;
}
//时间图标
- (UIImageView *)iconTimeT
{
    if (!_iconTimeT)
    {
        _iconTimeT=[[UIImageView alloc] init];
        _iconTimeT.image=[UIImage imageNamed:@"time"];
    }
    return _iconTimeT;
}
//时间
- (UILabel *)timeTextT
{
    if (!_timeTextT)
    {
        _timeTextT=[[UILabel alloc] init];
        _timeTextT.text=@"09.18";
        _timeTextT.textColor=[UIColor colorWithRed:(153.0/255) green:(153.0/255) blue:(153.0/255) alpha:1];
        _timeTextT.font=[UIFont systemFontOfSize:kWidthScale(11)];
    }
    return _timeTextT;
}
//点赞
- (UIImageView *)getUpT
{
    if (!_getUpT)
    {
        _getUpT=[[UIImageView alloc] init];
        _getUpT.image=[UIImage imageNamed:@"zans"];
    }
    return _getUpT;
}
//点赞数量
- (UILabel *)getUpNumT
{
    if (!_getUpNumT)
    {
        _getUpNumT=[[UILabel alloc] init];
        _getUpNumT.text=@"100";
        _getUpNumT.textColor=[UIColor colorWithRed:(153.0/255) green:(153.0/255) blue:(153.0/255) alpha:1];
        _getUpNumT.font=[UIFont systemFontOfSize:kWidthScale(11)];
    }
    return _getUpNumT;
}
//
- (UIImageView *)imageiconT
{
    if (!_imageiconT)
    {
        _imageiconT=[[UIImageView alloc] init];
        _imageiconT.image=[UIImage imageNamed:@"cxbianlun"];
    }
    return _imageiconT;
}
- (UILabel *)numTextT
{
    if (!_numTextT)
    {
        _numTextT=[[UILabel alloc] init];
        _numTextT.text=@"100";
        _numTextT.textColor=[UIColor colorWithRed:(153.0/255) green:(153.0/255) blue:(153.0/255) alpha:1];
        _numTextT.font=[UIFont systemFontOfSize:kWidthScale(11)];
    }
    return _numTextT;
}
//查看更多
- (UIButton *)checkButT
{
    if (!_checkButT)
    {
        _checkButT=[[UIButton alloc] init];
        [_checkButT setTitle:@"共190条讨论" forState:UIControlStateNormal];
        [_checkButT setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];
        _checkButT.titleLabel.font=[UIFont systemFontOfSize:kWidthScale(24/2)];
        _checkButT.backgroundColor=[UIColor orangeColor];
    }
    return _checkButT;
}


@end
